package cn.cimoc.controller;

import cn.cimoc.annotation.ResponseResult;
import cn.cimoc.service.OrderService;
import cn.cimoc.util.HttpStatus;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/orders")
@ResponseResult
public class OrderController extends BaseController{

    @Autowired
    OrderService service;

    @PostMapping("/create")
    public void create(Long aid, Long[] cids) {
        service.create(aid, cids, uid, tUsername);
        HttpStatus.success();
    }
}
